import java.util.Arrays;

/**
 * @Author Big_white
 * @Date 2021/11/16
 */
public class Client {
    public static void main(String[] args) {
        //遥控器对电灯的操作
        //创建电灯接受者
        LightReceiver lightReceiver = new LightReceiver();
        //创建电灯相应的开关命令
        LightOnCommand lightOnCommand = new LightOnCommand(lightReceiver);
        LightOffCommand lightOffCommand=new LightOffCommand(lightReceiver);
        //需要一个遥控器
        RemoteController remoteController = new RemoteController();
        //给我们的遥控器设置相关命令
        remoteController.setCommand(0,lightOnCommand,lightOffCommand);
        System.out.println("-------按下灯开的按钮---------");
        remoteController.onButtonWasPushed(0);
        System.out.println("-------按下灯关的按钮---------");
        remoteController.offButtonWasPushed(0);
        System.out.println("-------按下撤销的按钮---------");
        remoteController.undoButtonWasPushed();
    }
}
